#include <signal.h>
#include <iostream>
#include <sys/types.h>
#include <unistd.h>

int main()
{
    sigset_t block, old;
    sigemptyset(&block);
    sigemptyset(&old);
    sigaddset(&block, SIGINT);
    sigprocmask(SIG_BLOCK, &block, &old);
    while(true)
    {
        std::cout << "pid is " << getpid() << std::endl;
        sleep(1);
    }
    return 0;
}